<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>个人中心</title>
    <link rel="stylesheet" th:href="@{/static/layui/js/css/layui.css}">
    <script th:src="@{/static/layui/js/layui.js}" charset="UTF-8" type="text/javascript"></script>
    <script th:src="@{/static/vue/vue.js}" charset="UTF-8" type="text/javascript"></script>
    <script th:src="@{/static/vue/axios.min.js}" charset="UTF-8" type="text/javascript"></script>
    <script th:src="@{/static/jquery/jquery.js}" charset="UTF-8" type="text/javascript"></script>
    <style>
        .layui-bold{
            font-weight: bold;
        }
    </style>
</head>
<body>
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header layui-bg-green">
            <div class="layui-logo layui-hide-xs  layui-bg-green layui-bold">个人中心</div>
            <!-- 头部区域（可配合layui 已有的水平导航） -->
            <ul class="layui-nav layui-bg-green layui-layout-right" style="height: 59px">
                <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                    <a href="javascript:;">
                        <img src="//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" class="layui-nav-img" id="userPortrait">
                        我

                        <script th:inline="javascript">
                            let bufferedPortrait = [[${stp.getSession().getString('userPortraitCode')}]]
                            if(bufferedPortrait !== ''){
                                $('#userPortrait').attr('src',"data:image/png;base64,"+bufferedPortrait)
                            }else{
                                $('#userPortrait').attr('src',"//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg")
                            }

                        </script>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a th:href="@{/community/personal}">个人中心</a></dd>
                        <dd><a href="" class="logout">退出登录</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                    <a href="javascript:;">
                        <i class="layui-icon layui-icon-more-vertical"></i>
                    </a>
                </li>
            </ul>
        </div>

        <div class="layui-side layui-bg-green">
            <div class="layui-side-scroll">
                <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                <ul class="layui-nav layui-bg-green layui-nav-tree" lay-filter="test">
                    <li class="layui-nav-item layui-bg-green layui-nav-itemed">
                        <a class="layui-nav-itemed" >个人信息</a>
                        <dl class="layui-nav-child">
                            <dd><a style="margin-left: 20px;width: 80%;" th:href="@{/community/personal}">个人资料</a></dd>
                            <dd><a   style="margin-left: 20px;width: 80%;" th:href="@{/community/personal/security}">账号安全</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item"><a th:href="@{'/community/personal/space/'+${stp.getLoginId()}}">个人空间</a></li>
                    <li class="layui-nav-item"><a th:href="@{/community/personal/private_spaces}"><span style="color: white">私人空间</span><span class="layui-icon" style="margin-left: 5px">&#xe715;</span></a></li>
                </ul>
            </div>
        </div>

        <div class="layui-body">

                <!-- 内容主体区域 -->
                <div class="layui-row">
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                        <legend>我管理的私人空间</legend>
                    </fieldset>

                    <!--每个人最多加入或管理四个私人空间-->

                    <div class="layui-row layui-col-space20" style="margin-left: 20px;max-width: 1920px;">
                        <!--懒加载-->
                        <ul class="flow-default" id="managed_space"></ul>

                        <!--                    <div class="layui-col-md3">-->
                        <!--                        <div class="layui-panel layui-anim-up" style="width: 280px;height: 150px ">-->
                        <!--                            <div class="layui-row ">-->
                        <!--                                <div class="layui-col-md4">-->
                        <!--                                    <div class="layui-inline">-->
                        <!--                                        <img src="/static/img/test/IMG_1008.jpg" class="layui-circle" style="height: 80px;width: 80px;margin-top: 30px;margin-left: 30px">-->
                        <!--                                    </div>-->
                        <!--                                </div>-->

                        <!--                                <div class="layui-col-md4" style="margin-top: 60px;margin-left: 25px">-->
                        <!--                                    <a href="">米娅的小屋</a>-->
                        <!--                                </div>-->

                        <!--                                <div class="layui-col-md4" style="margin-bottom: 10px;margin-left: 75%">-->

                        <!--                                    <button type="button " class="layui-btn layui-btn-xs" id="1">-->
                        <!--                                        <i class="layui-icon layui-icon-down layui-font-12"></i> 操作-->
                        <!--                                    </button>-->
                        <!--                                </div>-->

                        <!--                            </div>-->

                        <!--                        </div>-->
                        <!--                    </div>-->
                        <!--                    <div class="layui-col-md3">-->
                        <!--                        <div class="layui-panel layui-anim-up" style="width: 280px;height: 150px">-->
                        <!--                            <div style="padding: 50px 30px;">一个面板</div>-->
                        <!--                        </div>-->
                        <!--                    </div>-->
                        <!--                    <div class="layui-col-md3">-->
                        <!--                        <div class="layui-panel layui-anim-up" style="width: 280px;height: 150px">-->
                        <!--                            <div style="padding: 50px 30px;">一个面板</div>-->
                        <!--                        </div>-->
                        <!--                    </div>-->
                        <!--                    <div class="layui-col-md3">-->
                        <!--                        <div class="layui-panel layui-anim-up" style="width: 280px;height: 150px">-->
                        <!--                            <div style="padding: 50px 30px;">一个面板</div>-->
                        <!--                        </div>-->
                        <!--                    </div>-->
                        <!--                </div>-->

                    </div>


                </div>


                <div class="layui-row">
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                        <legend>我加入的私人空间</legend>
                    </fieldset>

                    <div class="layui-row layui-col-space20" style="margin-left: 20px;max-width: 1920px;">
                        <!--懒加载-->
                        <ul class="flow-default" id="participated_space"></ul>
                    </div>

                </div>





        </div>

    </div>

<script th:src="@{/static/personal-main-private-spaces.js}"></script>
<script>
    //JS
    layui.use(['element', 'layer', 'util'], function(){
        var element = layui.element
            ,layer = layui.layer
            ,util = layui.util
            ,$ = layui.$;

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function(othis){
                layer.msg('展开左侧菜单的操作', {icon: 0});
            }
            ,menuRight: function(){
                layer.open({
                    type: 1
                    ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
                    ,area: ['260px', '100%']
                    ,offset: 'rt' //右上角
                    ,anim: 5
                    ,shadeClose: true
                });
            }
        });

    });
</script>


<!--负责执行退出登录的脚本-->
<form th:action="@{/logout}" class="logout-url"></form>
<form th:action="@{/login}" class="login-page"></form>
<script th:src="@{/static/logout.js}"></script>

</body>
</html>
